import '../item_style.dart';
import '../tooltip.dart';
import 'series.dart';

import 'package:json_annotation/json_annotation.dart';

part 'effect_scatter_series.g.dart';

@JsonSerializable(includeIfNull: false, explicitToJson: true)
class RippleEffect {
  var color;
  var period;
  var scale;
  var brushType;

  RippleEffect({this.color, this.period, this.scale, this.brushType});

  factory RippleEffect.fromJson(Map<String, dynamic> json) =>
      _$RippleEffectFromJson(json);

  Map<String, dynamic> toJson() => _$RippleEffectToJson(this);
}

@JsonSerializable(includeIfNull: false, explicitToJson: true)
class EffectScatterEmphasis {
  var scale;
  var focus;
  var blurScope;
  SeriesLabel? label;
  LabelLine? labelLine;
  ItemStyle? itemStyle;

  EffectScatterEmphasis(
      {this.scale,
      this.focus,
      this.blurScope,
      this.label,
      this.labelLine,
      this.itemStyle});

  factory EffectScatterEmphasis.fromJson(Map<String, dynamic> json) =>
      _$EffectScatterEmphasisFromJson(json);

  Map<String, dynamic> toJson() => _$EffectScatterEmphasisToJson(this);
}

@JsonSerializable(includeIfNull: false, explicitToJson: true)
class EffectScatterBlurSelectEmphasis {
  SeriesLabel? label;
  LabelLine? labelLine;
  SeriesItemStyle? itemStyle;

  EffectScatterBlurSelectEmphasis({this.label, this.labelLine, this.itemStyle});

  factory EffectScatterBlurSelectEmphasis.fromJson(Map<String, dynamic> json) =>
      _$EffectScatterBlurSelectEmphasisFromJson(json);

  Map<String, dynamic> toJson() =>
      _$EffectScatterBlurSelectEmphasisToJson(this);
}

@JsonSerializable(includeIfNull: false, explicitToJson: true)
class EffectScatterData {
  var symbol;
  var symbolSize;
  var symbolRotate;
  var symbolKeepAspect;
  var symbolOffset;
  SeriesLabel? label;
  LabelLine? labelLine;
  ItemStyle? itemStyle;
  EffectScatterBlurSelectEmphasis? emphasis;
  EffectScatterBlurSelectEmphasis? blur;
  EffectScatterBlurSelectEmphasis? select;
  Tooltip? tooltip;

  EffectScatterData(
      {this.symbol,
      this.symbolSize,
      this.symbolRotate,
      this.symbolKeepAspect,
      this.symbolOffset,
      this.label,
      this.labelLine,
      this.itemStyle,
      this.emphasis,
      this.blur,
      this.select,
      this.tooltip});

  factory EffectScatterData.fromJson(Map<String, dynamic> json) =>
      _$EffectScatterDataFromJson(json);

  Map<String, dynamic> toJson() => _$EffectScatterDataToJson(this);
}

@JsonSerializable(includeIfNull: false, explicitToJson: true)
class EffectScatterSeries extends Series {
  var type = 'effectScatter';
  var id;
  var name;
  var legendHoverLink;
  var effectType;
  var showEffectOn;

  RippleEffect? rippleEffect;

  var coordinateSystem;
  var xAxisIndex;
  var yAxisIndex;
  var polarIndex;
  var geoIndex;
  var calendarIndex;
  var symbol;
  var symbolSize;
  var symbolRotate;
  var symbolKeepAspect;
  var symbolOffset;
  var cursor;
  SeriesLabel? label;

  LabelLine? labelLine;
  LabelLayout? labelLayout;
  ItemStyle? itemStyle;

  EffectScatterEmphasis? emphasis;

  EffectScatterBlurSelectEmphasis? blur;
  EffectScatterBlurSelectEmphasis? select;

  var selectedMode;
  var seriesLayoutBy;
  var datasetIndex;
  var dimensions;
  var encode;

  List<EffectScatterData>? data;

  MarkPoint? markPoint;
  MarkLine? markLine;
  MarkArea? markArea;

  var zlvel;
  var z;
  var silent;

  var animation;
  var animationThreshold;
  var animationDuration;
  var animationEasing;
  var animationDelay;
  var animationDurationUpdate;
  var animationEasingUpdate;
  var animationDelayUpdate;
  Tooltip? tooltip;

  EffectScatterSeries(
      {this.id,
      this.name,
      this.legendHoverLink,
      this.effectType,
      this.showEffectOn,
      this.rippleEffect,
      this.coordinateSystem,
      this.xAxisIndex,
      this.yAxisIndex,
      this.polarIndex,
      this.geoIndex,
      this.calendarIndex,
      this.symbol,
      this.symbolSize,
      this.symbolRotate,
      this.symbolKeepAspect,
      this.symbolOffset,
      this.cursor,
      this.label,
      this.labelLine,
      this.labelLayout,
      this.itemStyle,
      this.emphasis,
      this.blur,
      this.select,
      this.selectedMode,
      this.seriesLayoutBy,
      this.datasetIndex,
      this.dimensions,
      this.encode,
      this.data,
      this.markPoint,
      this.markLine,
      this.markArea,
      this.zlvel,
      this.z,
      this.silent,
      this.animation,
      this.animationThreshold,
      this.animationDuration,
      this.animationEasing,
      this.animationDelay,
      this.animationDurationUpdate,
      this.animationEasingUpdate,
      this.animationDelayUpdate,
      this.tooltip});

  factory EffectScatterSeries.fromJson(Map<String, dynamic> json) =>
      _$EffectScatterSeriesFromJson(json);

  Map<String, dynamic> toJson() => _$EffectScatterSeriesToJson(this);
}
